package com.xike.micromemberserver.uitl;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Auther: wuson  <br/>
 * Date: 2021/3/8:17:03  <br/>
 * Description:
 */
public class JsonUtil {
    public  static String objectToJson(Object obj){
        ObjectMapper om = new ObjectMapper();
        String result = null;
        try {
             result= om.writeValueAsString(obj);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return result;
    }
}
